﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using CoreEx.Database.Query.Expressions;
using LinFu.IoC.Configuration;
using LinFu.IoC.Interfaces;

namespace CoreEx.Database.Linq
{
    public abstract class ExpressionHandlerBase<TExpression> : IExpressionHandler<TExpression>
    {
        public abstract DbExpression HandleExpression(TExpression expression,
                                                      Func<Expression, DbExpression> visitorCallback);

        static ExpressionHandlerBase()
        {
            ExpressionFactory = new DbExpressionFactory();
        }

        protected static DbExpressionFactory ExpressionFactory { get; private set; }
        
    }
}
